#!/bin/sh

for arg; do
	# cv2pdb affects hard-linked files; decouple them before processing
	test 1 -eq $(stat -c %h "$arg") ||
	{ cp "$arg" .1 && mv .1 "$arg"; } ||
	exit

	test "${arg%.exe}.pdb" -nt "$arg" ||
	cv2pdb "$arg" ||
	exit
done
